using System.Collections.Generic;
using UnityEngine;

// 创建菜单时，可以在Unity编辑器中直接创建ShopItemList对象
[CreateAssetMenu(menuName = "商店系统/商店物品列表")]
public class ShopItemList : ScriptableObject
{
    [Header("商店物品列表")]
    [SerializeField] private List<ShopInventoryItem> _items;

    [Header("商店允许的最大金币数")]
    [SerializeField] private int _maxAllowedGold;

    [Header("商店出售物品的加价比例")]
    [SerializeField] private float _sellMarkUp;

    [Header("商店购买物品的加价比例")]
    [SerializeField] private float _buyMarkUp;

    public List<ShopInventoryItem> Items => _items;
    public int MaxAllowedGold => _maxAllowedGold;
    public float SellMarkUp => _sellMarkUp;
    public float BuyMarkUp => _buyMarkUp;

    // 商店库存物品结构体
    [System.Serializable]
    public struct ShopInventoryItem
    {
        // 物品数据
        public InventoryItemData ItemData;

        // 物品数量
        public int Amount;
    }
}
